{extend name='base'/}
{block name='content'}
<ol class="breadcrumb" style="background-color: #f9f9f9;padding:8px 0;margin-bottom:10px;">
	<li>
		<a href=""><i class="fa fa-cogs"></i>
			规则管理</a>
	</li>
	<li class="active">
		<a href="{:url('index')}">规则列表</a>
	</li>
</ol>
<ul class="nav nav-tabs" role="tablist">
	<li class="active"><a href="{:url('index')}">规则列表</a></li>
	<li><a href="{:url('add')}">规则添加</a></li>
</ul>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">规则管理</h3>
	</div>
	<div class="panel-body">
		<table class="table table-hover">
			<thead>
			<tr>
				<th>编号</th>
				<th>中文名称</th>
				<th>标识</th>
				<th>导航</th>
				<!--<th>附加规则</th>-->
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
			{foreach name="treeData" item="v"}
			<tr>
				<td>{$v['id']}</td>
				<td>{$v['_title']}</td>
				<td>{$v['name']}</td>
				<td>{$v['nav']}</td>
				<!--<td> { $score }>100</td>-->
				<td>
					<div class="btn-group">
						<button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span></button>
						<ul class="dropdown-menu dropdown-menu-right">
							<li><a href="{:url('edit',['id'=>$v['id']])}">编辑</a></li>
							<li class="divider"></li>
							<li><a href="javascript:;" onclick="del({$v['id']})">删除</a></li>
						</ul>
					</div>
				</td>
			</tr>
			{/foreach}
			</tbody>
		</table>
	</div>
</div>

<script>
	function del(id) {
		util.confirm('确认删除吗',function(){
			location.href = "{:url('del')}" + "?id=" + id;
		});
	}
</script>
{/block}